home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / fontcombo.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-10-10  |  2.6 KB  |  101 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. /***************************************************************************
  8.                           fontcombo.h  -  description
  9.                              -------------------
  10.     begin                : Die Jun 17 2003
  11.     copyright            : (C) 2003 by Franz Schmid
  12.     email                : Franz.Schmid@altmuehlnet.de
  13.  ***************************************************************************/
  14.  
  15. /***************************************************************************
  16.  *                                                                         *
  17.  *   This program is free software; you can redistribute it and/or modify  *
  18.  *   it under the terms of the GNU General Public License as published by  *
  19.  *   the Free Software Foundation; either version 2 of the License, or     *
  20.  *   (at your option) any later version.                                   *
  21.  *                                                                         *
  22.  ***************************************************************************/
  23.  
  24. #ifndef FONTCOMBO_H
  25. #define FONTCOMBO_H
  26.  
  27. #include <QWidget>
  28. #include <QComboBox>
  29. #include "scribusapi.h"
  30.  
  31. class QEvent;
  32. class QFont;
  33. class QGridLayout;
  34. class QPixmap;
  35. class QLabel;
  36. class ScribusDoc;
  37. class PrefsManager;
  38.  
  39. /**
  40.   *@author Franz Schmid
  41.   */
  42.  
  43. class SCRIBUS_API FontCombo : public QComboBox
  44. {
  45. public:
  46.     FontCombo(QWidget* pa);
  47.     ~FontCombo() {};
  48.     
  49.     
  50.  
  51.     void RebuildList(ScribusDoc *currentDoc, bool forAnnotation = false, bool forSubstitute = false);
  52. private:
  53.     PrefsManager* prefsManager;
  54.     QPixmap ttfFont;
  55.     QPixmap otfFont;
  56.     QPixmap psFont;
  57.     QPixmap substFont;
  58. };
  59.  
  60. class SCRIBUS_API FontComboH : public QWidget
  61. {
  62.  
  63.     Q_OBJECT
  64.  
  65. public:
  66.     FontComboH(QWidget* parent, bool labels=false);
  67.     ~FontComboH() {};
  68.     
  69.     virtual void changeEvent(QEvent *e);
  70.     
  71.     QString currentFont();
  72.     void RebuildList(ScribusDoc *currentDoc, bool forAnnotation = false, bool forSubstitute = false);
  73.  
  74. public slots:
  75.     void setCurrentFont(QString f);
  76.     void languageChange();
  77.  
  78. signals:
  79.     void fontSelected(QString);
  80.  
  81. protected slots:
  82.     void familySelected(int id);
  83.     void styleSelected(int id);
  84.  
  85. protected:
  86.     QComboBox* fontFamily;
  87.     QComboBox* fontStyle;
  88.     QLabel *fontFaceLabel;
  89.     QLabel *fontStyleLabel;
  90.     PrefsManager* prefsManager;
  91.     ScribusDoc *currDoc;
  92.     QPixmap ttfFont;
  93.     QPixmap otfFont;
  94.     QPixmap psFont;
  95.     QPixmap substFont;
  96.     QGridLayout* fontComboLayout;
  97.     bool showLabels;
  98. };
  99.  
  100. #endif
  101.